package com.suyang.syt.dao.impl;

import org.springframework.stereotype.Repository;

import com.suyang.syt.dao.interfaces.RoleDao;
import com.suyang.syt.model.Role;

@Repository
public class RoleDaoImpl extends BaseDaoImpl<Role> implements RoleDao {

	@Override
	public long countName(String name) {
		String hql = " select count(*) from Role r where r.name=? ";
		return (Long) this.queryByHql(hql, name);
	}

	@Override
	public void deletes(String roleIds) {
		String hql = " delete from Role where id in(" + roleIds + ")";
		this.executeByHql(hql);
	}

}